/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kleintjes.creational.abstractfactory_pattern.model;

import com.kleintjes.creational.abstractfactory_pattern.Animal;
import com.kleintjes.creational.abstractfactory_pattern.Impl.Cat;
import com.kleintjes.creational.abstractfactory_pattern.Impl.Dog;
import com.kleintjes.creational.abstractfactory_pattern.SpeciesFactory;

/**
 *
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class MammalFactory extends SpeciesFactory{
    
    @Override
    public Animal getAnimal(String type) {
        if("dog".equals(type)) {
            return new Dog();
        } else {
            return new Cat();
        }
    }
    
}
